package leetcode.weekly.week328;

//Solution1Test
public class Solution1 {

	public int differenceOfSum(int[] nums) {
		int x = 0, y = 0;
		for (int num : nums) {
			x += num;
			int t = num;
			while (t > 0) {
				y += t % 10;
				t /= 10;
			}
		}
		return Math.abs(x - y);

	}

}
